package com.ruoyi.common.config;

import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

/**
 * @author lzw
 * 人脸相关配置类
 */
@Slf4j
@Component
public class FaceConfig {

    /**
     * 应用ID
     */
    public static String APP_ID;

    /**
     * 激活密钥
     */
    public static String SDK_KEY;

    /**
     * 相似度阈值
     */
    public static Float SIMILARITY_THRESHOLD;

    @Value("${face-service.app-id:2BNdqzH1qQGXsPrDrih8SEU2cwVpUPMPDHNeH4E9WJEB}")
    public void setAppId(String appId) {
        APP_ID = appId;
    }

    @Value("${face-service.sdk-key:TDdyei91gu1J3PLDcaHY93Fk6jFNM4rK6DfdQpYMtz8}")
    public void setSdkKey(String sdkKey) {
        SDK_KEY = sdkKey;
    }

    @Value("${face-service.similarity-threshold:0.82}")
    public void setSimilarityThreshold(Float similarityThreshold) {
        SIMILARITY_THRESHOLD = similarityThreshold;
    }

}
